package com.example.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;

@Table(name = "order_details")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderDetails {
    /**
     * 订单详情ID
     */
    @Id
    private Integer odid;

    /**
     * 商品名
     */
    private String name;

    /**
     * 单价
     */
    private BigDecimal price;

    /**
     * 数量
     */
    private Integer number;

    /**
     * 商品ID
     */
    private Integer gid;


    private Integer oid;
    //订单




    public OrderDetails(String name, BigDecimal price, Integer number, Integer gid) {
        this.name = name;
        this.price = price;
        this.number = number;
        this.gid = gid;
    }
}
